<template>
<div>

    <div class="header">标题</div>
  <div class="sidebar">
    <el-menu
      default-active="1"
      class="el-menu-vertical-demo"
      router
    >
      <el-menu-item  v-for="(item,index) in routes" :key="index" :index="item.path">
        <i class="el-icon-setting"></i>
        <span slot="title">{{item.title}}</span>
      </el-menu-item>
    </el-menu>
    <div class="content">
      <div class="breakcrumb"> 
        <el-breadcrumb separator-class="el-icon-arrow-right">
  <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
  <el-breadcrumb-item>活动管理</el-breadcrumb-item>
  <el-breadcrumb-item>活动列表</el-breadcrumb-item>
  <el-breadcrumb-item>活动详情</el-breadcrumb-item>
</el-breadcrumb>
      </div>
      <router-view></router-view>
    </div>
    
  </div></div>
</template>

<script>
export default {
  data() {
    return {
      isCollapse: true,
      routes:[
        {path:'/home/restaurant',title:'1'},
        {path:'/home/usermanager',title:'2'},
        {path:'/home/foodlist',title:'3'},
        {path:'/home/detail',title:'4'},
      ]

    }
  },
  methods: {
  },
}
</script>

<style>
.sidebar{
  display: flex;
    margin: 30px auto;
    max-width: 1200px;
    min-height: 430px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}
.header{
  width: 100%;
  height: 50px;
  border-bottom: 1px solid #e5e5e5;
}
.content{
padding: 10px;
}
.breakcrumb{
  height: 30px;
  width: 100%;
  line-height: 30px;
  

}
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 150px;
  height: 600px;
}
</style>
